package com.terry.test2.old;

import com.terry.test2.Result;
import org.springframework.stereotype.Controller;

import javax.xml.bind.ValidationException;
import java.math.BigDecimal;

/**
 * @author 小八
 * @date 2023年02月01日11:14
 *
 *
 * 通过网页 将一个银行账户的款项转给另一个账户，支持跨币种转账
 */
@Controller
public class TransferController {

    private TransferService transferService;

    public Result<Boolean> transfer(String targetAccountNumber, BigDecimal amount,Long userId) throws ValidationException {
        return transferService.transfer(userId,targetAccountNumber,amount,"CNY");
    }

}
